<?php
/**
 * Created by 荣耀电竞.
 * User: 林子彦 <278805354@qq.com>
 * Date: 2018/6/13 0013
 * Time: 10:12
 */

namespace App\Content\Repositories;
use App\Content\Contracts\ArticleInterface;
use App\Content\Model\ArticleClassModel;
use App\Content\Model\ArticleModel;


/**
 * 用户新闻列表
 * Class DbGoodsRepository
 * @package App\Shop\Repositories
 */
class DbArticleRepository implements ArticleInterface
{
    /**
     * 新闻模型
     * @return ArticleModel
     */
    public function getArticleModel(){
        return app()->make(ArticleModel::class);
    }

    /**
     * 新闻分类模型
     * @return ArticleClassModel
     */
    public function getArticleClassModel(){
        return app()->make(ArticleClassModel::class);
    }
    public function getArticleList($where){
        return $this->getArticleModel()->newQuery()->where($where)->orderBy("create_time","desc")->get();
    }
}